/**
 *  @file
 * @description 权限模块接口文件
 *  
 * */

import request from "./request"

/**
 *  @file
 * @description 获取所有菜单
 *  
*/
export const getMenus = () => request.get('menus')

export const getRoles = () => request.get("roles")

/**
 * 
 * @param {Number} id 当前用户的ID
 * @param {Number} rid 
 * @returns 
 */
export const updateRole = (id, rid) => request.put(`users/${id}/role`, { rid })
